<%@ page import="com.lianzheng.FileUploadStatus" %>
<%@ page import="com.lianzheng.AppConst" %>
<%--
  Created by IntelliJ IDEA.
  User: ChadZhao
  Date: 12-2-5
  Time: 上午12:54
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head><title>Simple jsp page</title>
<meta http-equiv="refresh" content="2"/></head>
<body>
</body>
<script type="text/javascript">
    <%if(request.getSession().getAttribute(AppConst.FILE_KEY) == null) {
    %>
    parent.doAutoUpload();
    <%
    } else {
        FileUploadStatus p = (FileUploadStatus)request.getSession().getAttribute(AppConst.FILE_KEY);
        if(p.isComplete()) {
            request.getSession().removeAttribute(AppConst.FILE_KEY);
            String tempid = null;
            if (request.getSession().getAttribute("tempid") != null) {
                tempid = request.getSession().getAttribute("tempid").toString();
            %>
        parent.setTempId("<%=tempid%>");
    <%
            }
        }
    %>
    <%--alert("getPBytesRead=<%=p.getpBytesRead()%>");--%>
    <%--alert("getPContentLength=<%=p.getpContentLength()%>");--%>
    <%--alert("getpContentLengthName=<%=p.getpContentLengthName()%>");--%>
    parent.refreshInfo("<%=p.getpContentLength()%>","<%=p.getpBytesRead()%>","<%=p.getpContentLengthName()%>");
    <%
    }
    %>
</script>
</html>